package gui;

import javax.swing.JPanel;
import java.awt.GridLayout;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.GridBagConstraints;
import java.awt.Font;
import javax.swing.SwingConstants;
import javax.swing.JCheckBox;
import java.awt.Insets;
import javax.swing.JTextField;
import java.awt.FlowLayout;
import java.awt.BorderLayout;

public class PlayerOptionsPanel extends JPanel {
	private JTextField txtPlayer;
	private JTextField txtPlayer_1;
	private JTextField txtPlay;
	private JTextField txtPlayer_2;

	/**
	 * Create the panel.
	 */
	public PlayerOptionsPanel() {
		setLayout(new BorderLayout(20, 0));
		
		JPanel panel = new JPanel();
		add(panel, BorderLayout.CENTER);
		GridBagLayout gbl_panel = new GridBagLayout();
		gbl_panel.columnWidths = new int[]{0, 0, 0, 0, 0, 0};
		gbl_panel.rowHeights = new int[]{0, 0, 0, 0, 0, 0};
		gbl_panel.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gbl_panel.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		panel.setLayout(gbl_panel);
		
		txtPlayer = new JTextField();
		txtPlayer.setText("Player 1");
		GridBagConstraints gbc_txtPlayer = new GridBagConstraints();
		gbc_txtPlayer.insets = new Insets(0, 0, 5, 5);
		gbc_txtPlayer.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtPlayer.gridx = 2;
		gbc_txtPlayer.gridy = 1;
		panel.add(txtPlayer, gbc_txtPlayer);
		txtPlayer.setColumns(10);
		
		JLabel lblNewLabel = new JLabel("Key P1");
		GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
		gbc_lblNewLabel.insets = new Insets(0, 0, 5, 0);
		gbc_lblNewLabel.gridx = 4;
		gbc_lblNewLabel.gridy = 1;
		panel.add(lblNewLabel, gbc_lblNewLabel);
		
		txtPlayer_1 = new JTextField();
		txtPlayer_1.setText("Player 2");
		GridBagConstraints gbc_txtPlayer_1 = new GridBagConstraints();
		gbc_txtPlayer_1.insets = new Insets(0, 0, 5, 5);
		gbc_txtPlayer_1.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtPlayer_1.gridx = 2;
		gbc_txtPlayer_1.gridy = 2;
		panel.add(txtPlayer_1, gbc_txtPlayer_1);
		txtPlayer_1.setColumns(10);
		
		JLabel lblNewLabel_1 = new JLabel("Key P2");
		GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
		gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 0);
		gbc_lblNewLabel_1.gridx = 4;
		gbc_lblNewLabel_1.gridy = 2;
		panel.add(lblNewLabel_1, gbc_lblNewLabel_1);
		
		JCheckBox chckbxNewCheckBox = new JCheckBox("");
		GridBagConstraints gbc_chckbxNewCheckBox = new GridBagConstraints();
		gbc_chckbxNewCheckBox.insets = new Insets(0, 0, 5, 5);
		gbc_chckbxNewCheckBox.gridx = 1;
		gbc_chckbxNewCheckBox.gridy = 3;
		panel.add(chckbxNewCheckBox, gbc_chckbxNewCheckBox);
		
		txtPlay = new JTextField();
		txtPlay.setText("Player 3");
		GridBagConstraints gbc_txtPlay = new GridBagConstraints();
		gbc_txtPlay.insets = new Insets(0, 0, 5, 5);
		gbc_txtPlay.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtPlay.gridx = 2;
		gbc_txtPlay.gridy = 3;
		panel.add(txtPlay, gbc_txtPlay);
		txtPlay.setColumns(10);
		
		JLabel lblNewLabel_2 = new JLabel("Key P3");
		GridBagConstraints gbc_lblNewLabel_2 = new GridBagConstraints();
		gbc_lblNewLabel_2.insets = new Insets(0, 0, 5, 0);
		gbc_lblNewLabel_2.gridx = 4;
		gbc_lblNewLabel_2.gridy = 3;
		panel.add(lblNewLabel_2, gbc_lblNewLabel_2);
		
		JCheckBox chckbxNewCheckBox_1 = new JCheckBox("");
		GridBagConstraints gbc_chckbxNewCheckBox_1 = new GridBagConstraints();
		gbc_chckbxNewCheckBox_1.insets = new Insets(0, 0, 0, 5);
		gbc_chckbxNewCheckBox_1.gridx = 1;
		gbc_chckbxNewCheckBox_1.gridy = 4;
		panel.add(chckbxNewCheckBox_1, gbc_chckbxNewCheckBox_1);
		
		txtPlayer_2 = new JTextField();
		txtPlayer_2.setText("Player 4");
		GridBagConstraints gbc_txtPlayer_2 = new GridBagConstraints();
		gbc_txtPlayer_2.insets = new Insets(0, 0, 0, 5);
		gbc_txtPlayer_2.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtPlayer_2.gridx = 2;
		gbc_txtPlayer_2.gridy = 4;
		panel.add(txtPlayer_2, gbc_txtPlayer_2);
		txtPlayer_2.setColumns(10);
		
		JLabel lblKeyP = new JLabel("Key P4");
		GridBagConstraints gbc_lblKeyP = new GridBagConstraints();
		gbc_lblKeyP.gridx = 4;
		gbc_lblKeyP.gridy = 4;
		panel.add(lblKeyP, gbc_lblKeyP);
		
		JLabel lblPlayer = new JLabel("Player");
		lblPlayer.setFont(new Font("Comic Sans MS", Font.BOLD, 18));
		lblPlayer.setHorizontalAlignment(SwingConstants.CENTER);
		add(lblPlayer, BorderLayout.NORTH);

	}

}
